package demo1222.am;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

/*

 */
public class Demo_04 {
    public static void main(String[] args) {
        Collection<String> col  = new ArrayList<>();
        col.add("hello");
        col.add("world");
        col.add("jack");

        Iterator<String> it = col.iterator();
        while (it.hasNext()){
            String s = it.next();
            if (s.equals("jack")){
               col.remove("jack");
            }
        }
        System.out.println(col);

        A<Integer> a = new A<>();

    }
}
class A<G>{
    public void print(G g){
        System.out.println(g);
    }
    //不行
    public static void show(){
        System.out.println();
    }
}